package com.xxx.yuedong.course.controller.form;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;


/**
 * 更新课程表单
 *
 * @Author YinXi
 * @Versin 1.0.0
 * @Date 2023/8/14
 */
@Data
public class UpdateCourseForm {
    /**
     * 课程id
     */
    @NotNull(message = "课程id不能为null")
    @ApiModelProperty(value = "课程id",required = true)
    private Long id;
    /**
     * 课程名称
     */
    @ApiModelProperty(value = "课程名称")
    private String name;
    /**
     * 课程描述
     */
    @Pattern(regexp = "^[\\s\\S]{0,200}$",
            message = "课程描述在200字以内")
    @ApiModelProperty(value = "课程描述")
    private String desc;
    /**
     * 课程封面
     */
    @NotBlank(message="课程封面不能为空")
    @ApiModelProperty(value = "课程URL地址",required = true)
    private String cover;
    /**
     * 视频地址
     */
    @ApiModelProperty(value = "视频URL地址")
    private String url;
    /**
     * 视频标签
     */
    @ApiModelProperty(value = "视频标签")
    private String tags;
    /**
     * 卡路里
     */
    @ApiModelProperty(value = "卡路里")
    private Integer calorie;
}
